package com.google.code.nexttraffic.web.model;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import com.google.code.nexttraffic.web.model.base.BaseObject;


/**
 * @author ParkHaeCheol
 * 
 */
public class Terminal extends BaseObject{

	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	private String number;
	private String terminalName;
	private String address;
	private String tel;
	private String scale;
	private String comments;
	
	public Terminal(){};
	
	
	public Terminal(String number, String terminalName,String address, String tel, String scale, String comments){
		this.number = number;
		this.terminalName = terminalName;
		this.address = address;
		this.tel = tel;
		this.scale = scale;
		this.comments = comments;
	}
	 
	public String getNumber() {
		return number;
	}


	public void setNumber(String number) {
		this.number = number;
	}

	public String getTerminalName() {
		return terminalName;
	}

	public void setTerminalName(String terminalName) {
		this.terminalName = terminalName;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getTel() {
		return tel;
	}

	public void setTel(String tel) {
		this.tel = tel;
	}

	public String getScale() {
		return scale;
	}

	public void setScale(String scale) {
		this.scale = scale;
	}

	public String getComments() {
		return comments;
	}

	public void setComments(String comments) {
		this.comments = comments;
	}

	@Override
	public boolean equals(Object o) {

		if (o instanceof Terminal == false) {
			return false;
		}

		if (this == o) {
			return true;
		}

		Terminal rhs = (Terminal) o;

		EqualsBuilder equb = new EqualsBuilder();
		equb.append(terminalName, rhs.getTerminalName());
		equb.append(address, rhs.getAddress());
		equb.append(tel, rhs.getTel());
		equb.append(scale, rhs.getScale());
		equb.append(comments, rhs.getComments());

		return equb.isEquals();
	}

	@Override
	public int hashCode() {

		HashCodeBuilder hashcode = new HashCodeBuilder(3, 37);
		hashcode.append(terminalName);
		hashcode.append(address);
		hashcode.append(tel);
		hashcode.append(scale);
		hashcode.append(comments);

		return hashcode.toHashCode();
	}

	@Override
	public String toString() {

		ToStringBuilder tob = new ToStringBuilder(this,
				ToStringStyle.MULTI_LINE_STYLE);

		tob.append("number", number);
		tob.append("terminalName", terminalName);
		tob.append("address", address);
		tob.append("tel", tel);
		tob.append("scale", scale);
		tob.append("comments", comments);

		return tob.toString();

	}

	

}
